import request from '@/utils/request';

/**
 * 注册接口
 */
export const getRegister = (data) => {
  return request({
    method: 'post',
    url: '/api/v1/user/register',
    data: data,
  });
};

/**
 * 登录接口
 */
export const getLogin = (data) => {
  return request({
    method: 'post',
    url: '/api/v1/user/login',
    data: data,
  });
};

/**
 * 获取用户信息接口
 */

export const getUserInfo = (data) => {
  return request({
    method: 'get',
    url: '/api/v1/user/userInfo',
    data: data,
  });
};

/**
 * 获取课程列表数据接口
 */

export const getCourse = (data) => {
  return request({
    method: 'get',
    url: '/api/v1/course/find',
    data: data,
  });
};

/**
 * 课程编辑接口
 */

export const getUpdateCourse = (data) => {
  return request({
    method: 'get',
    url: '/api/v1/course/update',
    data: data,
  });
};


/**
 * 课程删除接口
 */

export const getDeleteCourse = (data) => {
  return request({
    method: 'get',
    url: '/api/v1/course/delete',
    data: data,
  });
};

/**
 * 课程添加接口
 */

 export const getCreateCourse = (data) => {
  return request({
    method: 'post',
    url: '/api/v1/course/create',
    data: data,
  });
};